<%= provide(:title, 'All Users') %>
<h1> All Users </h1>

<%= will_paginate %>

<ul class="users">
  <% @users.each do |user| %>
    <li>
      <%= link_to user.name, user %>
      <% if current_user.admin? && !current_user?(user) %>
        <%= link_to "delete", user, method: :delete, confirm: "Are you sure?" %>
      <% end %>
    </li>
  <% end %>
</ul>

<%= will_paginate %>